<!--
 * @Author: lqx
 * @Date: 2022-04-21 17:41:43
 * @LastEditors: lqx
 * @LastEditTime: 2022-05-05 16:20:50
 * @Description: 页面入口
-->
<template>
  <div id="app">
    <DataviewIndex></DataviewIndex>
  </div>
</template>

<script>
import "@/assets/styles/css/reset.css";
import Models from "@/models";
import DataviewIndex from "@/views/dataview-index";

export default {
  name: "App",
  components: {
    DataviewIndex,
  },
  methods: {
    // 设置html字号
    setHtmlFont() {
      const fontSize = Models.Helper.setFontsize(1);
      document.documentElement.style.fontSize = fontSize + "px";
    },
  },
  mounted() {
    // 设置根字号
    this.setHtmlFont();
    // 监听窗口变化修改根字号
    window.addEventListener("resize", this.setHtmlFont);
  },
  destroyed() {
    // 取消监听
    window.removeEventListener("resize", this.setHtmlFont);
  },
};
</script>

<style>
#app {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
  position: relative;
  /* min-width: 1366px;
  min-height: 725px; */
}
</style>
